(temporarily) disable CMAKE_TUNE_FLAGS verification script code

This commit is contained in:
Axel Kohlmeyer
2020-04-27 23:17:43 -04:00
parent dd5ebb0a81
commit b362a06ca3

View File

@ -326,16 +326,17 @@ foreach(PKG_WITH_INCL KSPACE PYTHON VORONOI USER-COLVARS USER-MOLFILE USER-NETCD
endforeach()
set(CMAKE_TUNE_FLAGS "${CMAKE_TUNE_DEFAULT}" CACHE STRING "Compiler specific optimization or instrumentation")
separate_arguments(CMAKE_TUNE_FLAGS)
include(CheckCXXCompilerFlag)
foreach(_FLAG ${CMAKE_TUNE_FLAGS})
check_cxx_compiler_flag("${_FLAG}" COMPILER_SUPPORTS${_FLAG})
if(COMPILER_SUPPORTS${_FLAG})
target_compile_options(lammps PRIVATE ${_FLAG})
else()
message(WARNING "${_FLAG} found in CMAKE_TUNE_FLAGS, but not supported by the compiler, skipping")
endif()
endforeach()
# this is broken for many flags and compilers
#separate_arguments(CMAKE_TUNE_FLAGS)
#include(CheckCXXCompilerFlag)
#foreach(_FLAG ${CMAKE_TUNE_FLAGS})
# check_cxx_compiler_flag("${_FLAG}" COMPILER_SUPPORTS${_FLAG})
# if(COMPILER_SUPPORTS${_FLAG})
# target_compile_options(lammps PRIVATE ${_FLAG})
# else()
# message(WARNING "${_FLAG} found in CMAKE_TUNE_FLAGS, but not supported by the compiler, skipping")
# endif()
#endforeach()
########################################################################
# Basic system tests (standard libraries, headers, functions, types) #
########################################################################