Commit 385730e1 authored by Lars Kuehne's avatar Lars Kuehne

CMakeLists: Boost linking, OpenMP Flags, Intel Compiler flags for windows

parent a989d783
......@@ -7,15 +7,24 @@ set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
find_package(OpenMP)
add_executable(dynamicsystems main.cpp compute.cpp)
if(OPENMP_FOUND)
#target_compile_options(dynamicsystems PRIVATE ${OpenMP_CXX_FLAGS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
target_compile_options(dynamicsystems PRIVATE ${OpenMP_CXX_FLAGS})
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_link_libraries(dynamicsystems PRIVATE ${OpenMP_CXX_FLAGS})
endif()
endif()
find_package(Boost REQUIRED)
find_package(Boost REQUIRED COMPONENTS program_options)
target_include_directories(dynamicsystems PRIVATE ${Boost_INCLUDE_DIR})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lboost_program_options")
target_link_libraries(dynamicsystems PRIVATE ${Boost_LIBRARIES})
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
target_compile_options(dynamicsystems PRIVATE "-qopt-report=5" "-qopt-report-phase=vec" "-xhost")
if (WIN32)
target_compile_options(dynamicsystems PRIVATE "/Qopt-report:5"
"/Qopt-report-phase:vec"
"/QxHost")
else(WIN32)
target_compile_options(dynamicsystems PRIVATE "-qopt-report=5"
"-qopt-report-phase=vec"
"-xhost")
endif(WIN32)
endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment