forked from lijiext/lammps
cmake: reenable CMAKE_TUNE_FLAGS check
This commit is contained in:
parent
6be36196da
commit
24fe5bc187
|
@ -326,17 +326,17 @@ foreach(PKG_WITH_INCL KSPACE PYTHON VORONOI USER-COLVARS USER-MOLFILE USER-NETCD
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
set(CMAKE_TUNE_FLAGS "${CMAKE_TUNE_DEFAULT}" CACHE STRING "Compiler specific optimization or instrumentation")
|
set(CMAKE_TUNE_FLAGS "${CMAKE_TUNE_DEFAULT}" CACHE STRING "Compiler specific optimization or instrumentation")
|
||||||
# this is broken for many flags and compilers
|
separate_arguments(CMAKE_TUNE_FLAGS)
|
||||||
#separate_arguments(CMAKE_TUNE_FLAGS)
|
include(CheckCXXCompilerFlag)
|
||||||
#include(CheckCXXCompilerFlag)
|
foreach(_FLAG ${CMAKE_TUNE_FLAGS})
|
||||||
#foreach(_FLAG ${CMAKE_TUNE_FLAGS})
|
string(REGEX REPLACE "[=\"]" "" _FLAGX ${_FLAG})
|
||||||
# check_cxx_compiler_flag("${_FLAG}" COMPILER_SUPPORTS${_FLAG})
|
check_cxx_compiler_flag("${_FLAG}" COMPILER_SUPPORTS${_FLAGX})
|
||||||
# if(COMPILER_SUPPORTS${_FLAG})
|
if(COMPILER_SUPPORTS${_FLAGX})
|
||||||
# target_compile_options(lammps PRIVATE ${_FLAG})
|
target_compile_options(lammps PRIVATE ${_FLAG})
|
||||||
# else()
|
else()
|
||||||
# message(WARNING "${_FLAG} found in CMAKE_TUNE_FLAGS, but not supported by the compiler, skipping")
|
message(WARNING "${_FLAG} found in CMAKE_TUNE_FLAGS, but not supported by the compiler, skipping")
|
||||||
# endif()
|
endif()
|
||||||
#endforeach()
|
endforeach()
|
||||||
########################################################################
|
########################################################################
|
||||||
# Basic system tests (standard libraries, headers, functions, types) #
|
# Basic system tests (standard libraries, headers, functions, types) #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
Loading…
Reference in New Issue