-
Notifications
You must be signed in to change notification settings - Fork 26
Fix issues on MSVC and update build instructions. #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
0fd50be
2c484ef
49b116f
88a08c3
9d0f8f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,21 @@ | ||
| cmake_minimum_required(VERSION 3.9) | ||
|
|
||
| set(CMAKE_CXX_FLAGS -std=c++17) | ||
| set(CMAKE_CXX_STANDARD 17) | ||
| set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
|
||
| set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/modules) | ||
|
|
||
| find_package(OpenMP) | ||
| if (OPENMP_FOUND) | ||
| set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") | ||
| set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") | ||
| set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") | ||
| # cmath on MSVC needs this to define M_PI etc. | ||
| add_compile_definitions(_USE_MATH_DEFINES) | ||
|
|
||
| # skip OpenMP on MSVC as it doesn't support OpenMP 3.0 unsigned loops | ||
| if (!MSVC) | ||
| find_package(OpenMP) | ||
| if (OPENMP_FOUND) | ||
| set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") | ||
| set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") | ||
| set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") | ||
| endif() | ||
| endif() | ||
|
|
||
| add_subdirectory(src) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,7 @@ | ||
| find_package(Eigen3 CONFIG REQUIRED) | ||
|
|
||
| add_library(WaveGrid WaveGrid.cpp Enviroment.cpp Grid.cpp ProfileBuffer.cpp Spectrum.cpp ${Environment_RCS}) | ||
| target_link_libraries(WaveGrid Eigen3::Eigen) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Eigen3 does not have any libraries, it's header only?!
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's required to setup the correct include paths for the project. Maybe that's a MSVC thing but I don't think it hurts anyway.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
|
|
||
| add_subdirectory(tests) | ||
| add_subdirectory(visualization) | ||
|
|
||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| #pragma once | ||
|
|
||
| #include <eigen3/Eigen/Dense> | ||
| #include <Eigen/Dense> | ||
|
|
||
| template <class T> struct ValueTraits { | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| add_executable(integration_test integration_test.cpp) | ||
| target_link_libraries(integration_test Eigen3::Eigen) |
Uh oh!
There was an error while loading. Please reload this page.