diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2019-04-10 11:37:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-10 11:37:39 +0200 |
| commit | 309eab8fd741d09d836f41252a0eda49f3793520 (patch) | |
| tree | b717ddde13a268963219096e242da2780c31aec0 /test/unit | |
| parent | 3d0b8ce77fb44c5a45203123fd35cb1937d7057b (diff) | |
| parent | e41b9f143c783651ce8576f0ccc5ca612883c9e6 (diff) | |
| download | PROJ-309eab8fd741d09d836f41252a0eda49f3793520.tar.gz PROJ-309eab8fd741d09d836f41252a0eda49f3793520.zip | |
Merge pull request #1409 from mwtoews/cmake
CMake: Remove need to fiddle with CMAKE_C_FLAGS / CMAKE_CXX_FLAGS
Diffstat (limited to 'test/unit')
| -rw-r--r-- | test/unit/CMakeLists.txt | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index 66a69c3f..40a3dd06 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -11,12 +11,6 @@ else() message(STATUS "Using internal GTest") -# FIXME: Deal with our old-school CMakeLists.txt behaving badly -set(_save_c_flags "${CMAKE_C_FLAGS}") -set(_save_cxx_flags "${CMAKE_CXX_FLAGS}") -string(REGEX REPLACE "\\-W[a-z\\-]+" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) -string(REGEX REPLACE "\\-W[a-z\\-]+" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) - # # Build Google Test # @@ -48,12 +42,6 @@ add_subdirectory( ${CMAKE_BINARY_DIR}/googletest-build EXCLUDE_FROM_ALL) -# FIXME: Deal with our old-school CMakeLists.txt behaving badly -set(CMAKE_C_FLAGS "${_save_c_flags}") -set(CMAKE_CXX_FLAGS "${_save_cxx_flags}") -unset(_save_c_flags) -unset(_save_cxx_flags) - # Provide the same target name as find_package(GTest) add_library(GTest::gtest ALIAS gtest) @@ -72,6 +60,9 @@ include_directories(${SQLITE3_INCLUDE_DIR}) # Add the directory containing proj_config.h include_directories(${CMAKE_BINARY_DIR}/src) +# Apply to targets in the current directory and below +add_compile_options(${PROJ_CXX_WARN_FLAGS}) + add_executable(proj_pj_transform_test main.cpp pj_transform_test.cpp) |
