Skip to content

Commit

Permalink
Don't force CMake's build type
Browse files Browse the repository at this point in the history
Specifically, this will allow CMake users to choose build types for
themselves, and prevent our override interfering with the
`fedora-review` tool's builds.
  • Loading branch information
pcolby committed Mar 11, 2015
1 parent 33e02b5 commit 82f9af0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
9 changes: 2 additions & 7 deletions test/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
cmake_minimum_required(VERSION 2.6)
project(unit-tests CXX)

# Set the build type if it isn't already
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()

# Add PMDA++ headers to the include path.
include_directories(${PROJECT_SOURCE_DIR}/../../include)

Expand Down Expand Up @@ -77,8 +72,8 @@ if (NOT GTEST_FOUND)
add_dependencies(${PROJECT_NAME} googletest)
# Mimic the FindGTest module's library variables.
ExternalProject_Get_Property(googletest binary_dir)
set(GTEST_LIBRARY ${binary_dir}/release/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX})
set(GTEST_MAIN_LIBRARY ${binary_dir}/release/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX})
set(GTEST_LIBRARY ${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX})
set(GTEST_MAIN_LIBRARY ${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX})
set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARY} ${GTEST_MAIN_LIBRARY})
endif()

Expand Down
2 changes: 0 additions & 2 deletions test/unit/GoogleTestExternal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ ExternalProject_Add(
UPDATE_COMMAND "" # Don't update the svn checkout every time we build.
TIMEOUT 10
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG:PATH=debug
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:PATH=release
-Dgtest_force_shared_crt=ON
INSTALL_COMMAND "" # Disable install step
LOG_DOWNLOAD ON
Expand Down

0 comments on commit 82f9af0

Please sign in to comment.