Skip to content

Commit e5a66a6

Browse files
committed
Set CMAKE_BUILD_TYPE default on win32 too
1 parent 2d5245e commit e5a66a6

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

CMakeLists.txt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,10 @@ OPTION(JSONCPP_WITH_PKGCONFIG_SUPPORT "Generate and install .pc files" ON)
1212
OPTION(JSONCPP_WITH_CMAKE_PACKAGE "Generate and install cmake package files" ON)
1313
OPTION(BUILD_SHARED_LIBS "Build jsoncpp_lib as a shared library." OFF)
1414

15-
# Ensures that CMAKE_BUILD_TYPE is visible in cmake-gui on Unix
16-
IF(NOT WIN32)
17-
IF(NOT CMAKE_BUILD_TYPE)
18-
SET(CMAKE_BUILD_TYPE Release CACHE STRING
19-
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel Coverage."
20-
FORCE)
21-
ENDIF()
15+
# Ensures that CMAKE_BUILD_TYPE has a default value
16+
IF(NOT DEFINED CMAKE_BUILD_TYPE)
17+
SET(CMAKE_BUILD_TYPE Release CACHE STRING
18+
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel Coverage.")
2219
ENDIF()
2320

2421
# Enable runtime search path support for dynamic libraries on OSX

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ environment:
1010
build_script:
1111
- cmake --version
1212
- cd c:\projects\jsoncpp
13-
- cmake -G "%CMAKE_GENERATOR%" -DCMAKE_INSTALL_PREFIX=%CD:\=/%/install -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON .
13+
- cmake -G "%CMAKE_GENERATOR%" -DCMAKE_INSTALL_PREFIX=%CD:\=/%/install -DBUILD_SHARED_LIBS=ON .
1414
- cmake --build . --config Release --target install
1515

1616
deploy:

0 commit comments

Comments
 (0)