Skip to content
Snippets Groups Projects
Commit 77236674 authored by Debolskiy Andrey's avatar Debolskiy Andrey :bicyclist_tone5:
Browse files

fix compile flags

parent 77fbd86a
No related branches found
No related tags found
No related merge requests found
Pipeline #1585 failed
......@@ -30,7 +30,7 @@ if(BUILD_DOC)
# option ALL allows to build the docs together with the code
add_custom_target( doc_doxygen ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_IN}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) # WORKING_DIRECTORY: Execute the command with the given current working directory. If it is a relative path it will be interpreted relative to the build tree directory corresponding to the current source directory.
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )
else()
message("Doxygen need to be installed to generate the doxygen documentation")
endif (DOXYGEN_FOUND)
......@@ -196,6 +196,8 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
SET(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
SET(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
SET(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
SET(CMAKE_Fortran_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
SET(CMAKE_Fortran_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
endif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
# set(CMAKE_Fortran_ARCHIVE_FINISH "$<CMAKE_RANLIB> -no_warning_for_no_symbols -c $<TARGET>")
target_include_directories(sfx_lib PUBLIC ${CMAKE_BINARY_DIR}/modules/)
......@@ -225,10 +227,26 @@ if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
target_compile_options(sfx
PUBLIC $<$<COMPILE_LANGUAGE:Fortran>: -g -traceback -check all -ftrapuv -debug all >)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_compile_options(sfx-
target_compile_options(sfx
PUBLIC $<$<COMPILE_LANGUAGE:Fortran>: -g -fbacktrace -ffpe-trap=zero,overflow,underflow >)
endif()
endif()
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
target_compile_options(sfx_lib
PUBLIC $<$<COMPILE_LANGUAGE:C>: -g >)
target_compile_options(sfx_lib
PUBLIC $<$<COMPILE_LANGUAGE:CXX>: -g >)
target_compile_options(sfx_lib
PUBLIC $<$<COMPILE_LANGUAGE:CUDA>: -g >)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
target_compile_options(sfx_lib
PUBLIC $<$<COMPILE_LANGUAGE:Fortran>: -g -traceback -check all -ftrapuv -debug all >)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_compile_options(sfx_lib
PUBLIC $<$<COMPILE_LANGUAGE:Fortran>: -g -fbacktrace -ffpe-trap=zero,overflow,underflow >)
endif()
endif()
# copy data & configs on post build
add_custom_command(
......
......@@ -49,6 +49,19 @@ set(SOURCES_CXX ${SOURCES_CXX} ${SOURCES_C})
set(HEADERS_CXX ${HEADERS_CXX})
add_library(config_parser_CXX STATIC ${HEADERS_CXX} ${SOURCES_CXX})
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
target_compile_options(config_parser_CXX
PUBLIC $<$<COMPILE_LANGUAGE:CXX>: -restrict -alias-const -parallel -funroll-loops -no-ansi-alias >)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "IntelLLVM")
target_compile_options(config_parser_CXX
PUBLIC $<$<COMPILE_LANGUAGE:CXX>: -no-ansi-alias -funroll-loops -Wno-tautological-constant-compare >)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_compile_options(config_parser_CXX
PUBLIC $<$<COMPILE_LANGUAGE:CXX>: -fno-strict-aliasing -funroll-loops >)
endif()
find_package(OpenMP REQUIRED)
target_link_libraries(config_parser_CXX PUBLIC OpenMP::OpenMP_CXX)
add_library(config_parser_F STATIC ${SOURCES_F})
set_property(TARGET config_parser_F PROPERTY LINKER_LANGUAGE Fortran)
target_link_libraries(config_parser_F config_parser_CXX)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment