mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 12:23:37 -05:00
Added CMake option to control experimental features.
Sometimes parts of the application are not fully ready for release at release time. This option allows such features to be enabled conditionally at configure time. The CMake option WSJT_ENABLE_EXPERIMENTAL_FEATURES is used to control this ability. Normally you will not need to change it as it behaves in a reasonable way. The option is ON in debug build configurations and OFF in non-debug configuratiuons. The option is made available in all source modules via the WSJT_ENABLE_EXPERIMENTAL_FEATURES macro which is defined to 1 if the option is ON and to 0 if it is OFF. Since this default behavior is potentially dangerous because it can mean that release builds contain different code from debug builds; the option may be set to OFF in debug configurations in the normal way (cmake-gui, edit CMakeCache.txt, etc.) to achieve a debug build similar to a default release build. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4182 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
d6d445b33f
commit
e0e67f0a6a
@ -40,6 +40,17 @@ set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMake/Modules)
|
|||||||
include (${PROJECT_SOURCE_DIR}/CMake/VersionCompute.cmake)
|
include (${PROJECT_SOURCE_DIR}/CMake/VersionCompute.cmake)
|
||||||
|
|
||||||
|
|
||||||
|
# make sure that the default configuration is a RELEASE
|
||||||
|
if (NOT CMAKE_BUILD_TYPE)
|
||||||
|
set (CMAKE_BUILD_TYPE RELEASE CACHE STRING
|
||||||
|
"Choose the type of build, options are: None Debug Release."
|
||||||
|
FORCE)
|
||||||
|
endif (NOT CMAKE_BUILD_TYPE)
|
||||||
|
if (CMAKE_BUILD_TYPE MATCHES "[Dd][Ee][Bb][Uu][Gg]")
|
||||||
|
set (is_debug_build 1)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Options & features
|
# Options & features
|
||||||
#
|
#
|
||||||
@ -47,6 +58,8 @@ include (${PROJECT_SOURCE_DIR}/CMake/VersionCompute.cmake)
|
|||||||
# wsjtx_config.h.in which makes them available to the C/C++
|
# wsjtx_config.h.in which makes them available to the C/C++
|
||||||
# pre-processor.
|
# pre-processor.
|
||||||
#
|
#
|
||||||
|
include (CMakeDependentOption)
|
||||||
|
|
||||||
option (UPDATE_TRANSLATIONS "Update source translation translations/*.ts
|
option (UPDATE_TRANSLATIONS "Update source translation translations/*.ts
|
||||||
files (WARNING: make clean will delete the source .ts files! Danger!)")
|
files (WARNING: make clean will delete the source .ts files! Danger!)")
|
||||||
option (WSJT_SHARED_RUNTIME "Debugging option that allows running from a shared Cloud directory.")
|
option (WSJT_SHARED_RUNTIME "Debugging option that allows running from a shared Cloud directory.")
|
||||||
@ -59,6 +72,10 @@ option (WSJT_STANDARD_FILE_LOCATIONS "All non-installation files located in \"St
|
|||||||
option (WSJT_SOFT_KEYING "Apply a ramp to CW keying envelope to reduce transients." ON)
|
option (WSJT_SOFT_KEYING "Apply a ramp to CW keying envelope to reduce transients." ON)
|
||||||
option (WSJT_SKIP_MANPAGES "Skip *nix manpage generation")
|
option (WSJT_SKIP_MANPAGES "Skip *nix manpage generation")
|
||||||
|
|
||||||
|
CMAKE_DEPENDENT_OPTION (WSJT_ENABLE_EXPERIMENTAL_FEATURES "Enable features not fully ready for public releases." ON
|
||||||
|
"is_debug_build" OFF)
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# install locations
|
# install locations
|
||||||
#
|
#
|
||||||
@ -347,13 +364,6 @@ if (POLICY CMP0020)
|
|||||||
cmake_policy (SET CMP0020 NEW) # link to Qt winmain on Windows
|
cmake_policy (SET CMP0020 NEW) # link to Qt winmain on Windows
|
||||||
endif (POLICY CMP0020)
|
endif (POLICY CMP0020)
|
||||||
|
|
||||||
# make sure that the default is a RELEASE
|
|
||||||
if (NOT CMAKE_BUILD_TYPE)
|
|
||||||
set (CMAKE_BUILD_TYPE RELEASE CACHE STRING
|
|
||||||
"Choose the type of build, options are: None Debug Release."
|
|
||||||
FORCE)
|
|
||||||
endif (NOT CMAKE_BUILD_TYPE)
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# decide on platform specifc packing and fixing up
|
# decide on platform specifc packing and fixing up
|
||||||
@ -729,7 +739,7 @@ endif (NOT WIN32 AND NOT APPLE)
|
|||||||
#
|
#
|
||||||
# bundle fixup only done in Release or MinSizeRel configurations
|
# bundle fixup only done in Release or MinSizeRel configurations
|
||||||
#
|
#
|
||||||
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
if (NOT is_debug_build)
|
||||||
|
|
||||||
# get_target_property (QtCore_location Qt5::Core LOCATION)
|
# get_target_property (QtCore_location Qt5::Core LOCATION)
|
||||||
# get_filename_component (QtCore_location ${QtCore_location} PATH)
|
# get_filename_component (QtCore_location ${QtCore_location} PATH)
|
||||||
@ -857,7 +867,7 @@ file (APPEND \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${WSJT_QT_CONF_DESTINATION
|
|||||||
)
|
)
|
||||||
endif (APPLE OR WIN32)
|
endif (APPLE OR WIN32)
|
||||||
|
|
||||||
endif (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
endif (NOT is_debug_build)
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -793,6 +793,10 @@ Configuration::impl::impl (Configuration * self, QString const& instance_key, QS
|
|||||||
initialise_models ();
|
initialise_models ();
|
||||||
|
|
||||||
transceiver_thread_.start ();
|
transceiver_thread_.start ();
|
||||||
|
|
||||||
|
#if !WSJT_ENABLE_EXPERIMENTAL_FEATURES
|
||||||
|
ui_->jt9w_group_box->setEnabled (false);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
Configuration::impl::~impl ()
|
Configuration::impl::~impl ()
|
||||||
|
@ -6,10 +6,16 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>586</width>
|
<width>508</width>
|
||||||
<height>550</height>
|
<height>471</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>508</width>
|
||||||
|
<height>471</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Configuration</string>
|
<string>Configuration</string>
|
||||||
</property>
|
</property>
|
||||||
@ -1815,12 +1821,12 @@ soundcard changes</string>
|
|||||||
</connection>
|
</connection>
|
||||||
</connections>
|
</connections>
|
||||||
<buttongroups>
|
<buttongroups>
|
||||||
<buttongroup name="TX_audio_source_button_group"/>
|
|
||||||
<buttongroup name="TX_mode_button_group"/>
|
|
||||||
<buttongroup name="split_mode_button_group"/>
|
|
||||||
<buttongroup name="CAT_stop_bits_button_group"/>
|
|
||||||
<buttongroup name="PTT_method_button_group"/>
|
|
||||||
<buttongroup name="CAT_data_bits_button_group"/>
|
<buttongroup name="CAT_data_bits_button_group"/>
|
||||||
|
<buttongroup name="TX_audio_source_button_group"/>
|
||||||
<buttongroup name="CAT_handshake_button_group"/>
|
<buttongroup name="CAT_handshake_button_group"/>
|
||||||
|
<buttongroup name="split_mode_button_group"/>
|
||||||
|
<buttongroup name="PTT_method_button_group"/>
|
||||||
|
<buttongroup name="TX_mode_button_group"/>
|
||||||
|
<buttongroup name="CAT_stop_bits_button_group"/>
|
||||||
</buttongroups>
|
</buttongroups>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -414,6 +414,10 @@ MainWindow::MainWindow(bool multiple, QSettings * settings, QSharedMemory *shdme
|
|||||||
m_config.transceiver_online (true);
|
m_config.transceiver_online (true);
|
||||||
qsy (m_lastMonitoredFrequency);
|
qsy (m_lastMonitoredFrequency);
|
||||||
monitor (!m_config.monitor_off_at_startup ());
|
monitor (!m_config.monitor_off_at_startup ());
|
||||||
|
|
||||||
|
#if !WSJT_ENABLE_EXPERIMENTAL_FEATURES
|
||||||
|
ui->actionJT9W_1->setEnabled (false);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------- MainWindow destructor
|
//--------------------------------------------------- MainWindow destructor
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#cmakedefine01 WSJT_HAMLIB_TRACE
|
#cmakedefine01 WSJT_HAMLIB_TRACE
|
||||||
#cmakedefine01 WSJT_STANDARD_FILE_LOCATIONS
|
#cmakedefine01 WSJT_STANDARD_FILE_LOCATIONS
|
||||||
#cmakedefine01 WSJT_SOFT_KEYING
|
#cmakedefine01 WSJT_SOFT_KEYING
|
||||||
|
#cmakedefine01 WSJT_ENABLE_EXPERIMENTAL_FEATURES
|
||||||
|
|
||||||
#define WSJTX_STRINGIZE1(x) #x
|
#define WSJTX_STRINGIZE1(x) #x
|
||||||
#define WSJTX_STRINGIZE(x) WSJTX_STRINGIZE1(x)
|
#define WSJTX_STRINGIZE(x) WSJTX_STRINGIZE1(x)
|
||||||
|
Loading…
Reference in New Issue
Block a user