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; }