From bf1566884c9165d17a13a6b05f9a3385b12426d5 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 5 Aug 2013 10:38:50 -0500 Subject: [PATCH] 1) Remove requirement to define KICAD_TESTING_BRANCH. Instead the KICAD_STABLE_BRANCH must be defined if that is the build type wanted. This only affects a text string anyways, is not particularly important other than telling user from which code branch the source came. 2) Change name of "testing" to "product" in that same description within common/build_version.cpp. "testing" made it sound frightenly unusable. --- CMakeLists.txt | 15 ++------------- common/build_version.cpp | 18 ++++++++---------- 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0dbf597ebf..21b2f16411 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,10 +35,6 @@ option(KICAD_STABLE_VERSION "set this option to ON to build the stable version of KICAD. mainly used to set version ID (default OFF)" ) -option(KICAD_TESTING_VERSION - "set this option to ON to build the testing version of KICAD. mainly used to set version ID (default OFF)" - ) - option(KICAD_SCRIPTING "set this option ON to build the scripting support inside kicad binaries" ) @@ -62,16 +58,9 @@ option(USE_FP_LIB_TABLE "Use the new footprint library table implementation. (de #Set version option (stable or testing) -if(KICAD_STABLE_VERSION AND KICAD_TESTING_VERSION ) - message(FATAL_ERROR "Only one KiCad build version option KICAD_TESTING_VERSION or KICAD_STABLE_VERSION can be set to ON") -elseif(NOT KICAD_STABLE_VERSION AND NOT KICAD_TESTING_VERSION) - message(FATAL_ERROR "Either KiCad build version option KICAD_TESTING_VERSION or KICAD_STABLE_VERSION must be set to ON") -elseif(KICAD_STABLE_VERSION) +if(KICAD_STABLE_VERSION) add_definitions(-DKICAD_STABLE_VERSION) - message( "Build stable version of KiCad") -else() - add_definitions(-DKICAD_TESTING_VERSION) - message("Build testing (unstable) version of KiCad") + message( "Building stable version of KiCad") endif() # All CMake downloads go here. Suggested is up in the source tree, not in the build dir where they diff --git a/common/build_version.cpp b/common/build_version.cpp index 9ad25196e8..5ab8b54c3c 100644 --- a/common/build_version.cpp +++ b/common/build_version.cpp @@ -10,15 +10,10 @@ #endif -#if defined KICAD_TESTING_VERSION -# define VERSION_STABILITY "testing" -#elif defined KICAD_STABLE_VERSION +#if defined KICAD_STABLE_VERSION # define VERSION_STABILITY "stable" #else -# define VERSION_STABILITY "unknown" -# warning "unknown version stability" -# warning "please: when running CMAKE, add -DKICAD_TESTING_VERSION=ON" -# warning "or -DKICAD_STABLE_VERSION=ON option" +# define VERSION_STABILITY "product" #endif /** @@ -27,8 +22,11 @@ */ wxString GetBuildVersion() { - static wxString msg; - msg.Printf( wxT("%s-%s"), - wxT( KICAD_BUILD_VERSION ), wxT( VERSION_STABILITY )); + wxString msg = wxString::Format( + wxT( "%s-%s" ), + wxT( KICAD_BUILD_VERSION ), + wxT( VERSION_STABILITY ) + ); + return msg; }