@@ -18,8 +18,8 @@ IF(NOT WIN32)
1818 SET (CMAKE_BUILD_TYPE Release CACHE STRING
1919 "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel Coverage."
2020 FORCE)
21- ENDIF (NOT CMAKE_BUILD_TYPE )
22- ENDIF (NOT WIN32 )
21+ ENDIF ()
22+ ENDIF ()
2323
2424SET (DEBUG_LIBNAME_SUFFIX "" CACHE STRING "Optional suffix to append to the library name for a debug build" )
2525SET (LIB_SUFFIX "" CACHE STRING "Optional arch-dependent suffix for the library installation directory" )
@@ -39,7 +39,7 @@ MARK_AS_ADVANCED( RUNTIME_INSTALL_DIR ARCHIVE_INSTALL_DIR INCLUDE_INSTALL_DIR PA
3939# Set variable named ${VAR_NAME} to value ${VALUE}
4040FUNCTION (set_using_dynamic_name VAR_NAME VALUE )
4141 SET ( "${VAR_NAME} " "${VALUE} " PARENT_SCOPE)
42- ENDFUNCTION (set_using_dynamic_name )
42+ ENDFUNCTION ()
4343
4444# Extract major, minor, patch from version text
4545# Parse a version string "X.Y.Z" and outputs
@@ -55,8 +55,8 @@ MACRO(jsoncpp_parse_version VERSION_TEXT OUPUT_PREFIX)
5555 set_using_dynamic_name( "${OUPUT_PREFIX} _FOUND" TRUE )
5656 ELSE ( ${VERSION_TEXT} MATCHES ${VERSION_REGEX} )
5757 set_using_dynamic_name( "${OUPUT_PREFIX} _FOUND" FALSE )
58- ENDIF ( ${VERSION_TEXT} MATCHES ${VERSION_REGEX} )
59- ENDMACRO (jsoncpp_parse_version )
58+ ENDIF ()
59+ ENDMACRO ()
6060
6161# Read out version from "version" file
6262#FILE(STRINGS "version" JSONCPP_VERSION)
@@ -83,7 +83,7 @@ macro(UseCompilationWarningAsError)
8383 # Only enabled in debug because some old versions of VS STL generate
8484 # warnings when compiled in release configuration.
8585 set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /WX " )
86- endif ( MSVC )
86+ endif ()
8787endmacro ()
8888
8989# Include our configuration header
@@ -93,20 +93,20 @@ if ( MSVC )
9393 # Only enabled in debug because some old versions of VS STL generate
9494 # unreachable code warning when compiled in release configuration.
9595 set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /W4 " )
96- endif ( MSVC )
96+ endif ()
9797
9898if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
9999 # using regular Clang or AppleClang
100100 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Werror -Wall -Wshadow -Wshorten-64-to-32" )
101- elseif (" ${ CMAKE_CXX_COMPILER_ID} " STREQUAL "GNU" )
101+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
102102 # using GCC
103103 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wshadow -Wextra -pedantic -Wno-long-long" )
104104 # not yet ready for -Wsign-conversion
105105endif ()
106106
107107IF (JSONCPP_WITH_WARNING_AS_ERROR)
108108 UseCompilationWarningAsError()
109- ENDIF (JSONCPP_WITH_WARNING_AS_ERROR )
109+ ENDIF ()
110110
111111IF (JSONCPP_WITH_PKGCONFIG_SUPPORT)
112112 CONFIGURE_FILE (
@@ -115,13 +115,13 @@ IF(JSONCPP_WITH_PKGCONFIG_SUPPORT)
115115 @ONLY)
116116 INSTALL (FILES "${CMAKE_BINARY_DIR} /pkg-config/jsoncpp.pc"
117117 DESTINATION "${CMAKE_INSTALL_PREFIX} /lib${LIB_SUFFIX} /pkgconfig" )
118- ENDIF (JSONCPP_WITH_PKGCONFIG_SUPPORT )
118+ ENDIF ()
119119
120120IF (JSONCPP_WITH_CMAKE_PACKAGE)
121121 INSTALL (EXPORT jsoncpp
122122 DESTINATION ${PACKAGE_INSTALL_DIR} /jsoncpp
123123 FILE jsoncppConfig.cmake)
124- ENDIF (JSONCPP_WITH_CMAKE_PACKAGE )
124+ ENDIF ()
125125
126126# Build the different applications
127127ADD_SUBDIRECTORY ( src )
0 commit comments