Skip to content

Commit

Permalink
build: adding NDEBUG to #defines
Browse files Browse the repository at this point in the history
  • Loading branch information
martim01 committed May 18, 2020
1 parent 471b6e8 commit a0342da
Show file tree
Hide file tree
Showing 43 changed files with 54 additions and 16 deletions.
2 changes: 1 addition & 1 deletion external/sapserver
Submodule sapserver updated 1 files
+1 −1 CMakeLists.txt
3 changes: 2 additions & 1 deletion manifest_creator/manifest_creator.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,12 @@
<Option type="0" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O3" />
<Add option="`wx-config --cxxflags`" />
<Add option="-fpermissive" />
<Add option="-O3" />
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
1 change: 1 addition & 0 deletions pam2.workspace
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<Project filename="external/dnssd/dnssd.cbp" />
<Project filename="external/sapserver/sapserver.cbp" />
<Project filename="manifest_creator/manifest_creator.cbp" />
<Project filename="external/ptpmonkey/ptpmonkey.cbp" />
<Project filename="pambase/pambase.cbp" />
<Project filename="pamfft/pamfft.cbp" />
<Project filename="pamlevel/pamlevel.cbp" />
Expand Down
1 change: 1 addition & 0 deletions pam2/pam2.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
<Add directory="$(#nmos.include)" />
<Add directory="$(#json.include)" />
</Compiler>
Expand Down
2 changes: 1 addition & 1 deletion pam2/pam2App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ IMPLEMENT_APP(pam2App);
bool pam2App::OnInit()
{
m_bReset = false;
#ifndef __WXDEBUG__
#ifdef NDEGBU
wxLog::SetLogLevel(0);
#endif
#ifdef __WXGNU__
Expand Down
2 changes: 1 addition & 1 deletion pam2/pnlUpdate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ void pnlUpdate::OnbtnSelectClick(wxCommandEvent& event)

void pnlUpdate::OnbtnCheckClick(wxCommandEvent& event)
{
#ifdef __WXDEBUG__
#ifndef NDEBUG
#ifdef __WXMSW__
wxString sUpdate = wxT("C:\\developer\\matt\\pam2\\pamupdatemanager\\bin\\Debug\\pamupdatemanager");
#else
Expand Down
3 changes: 1 addition & 2 deletions pam2/wxlogoutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ void wxLogOutput::Flush(int nLogLevel, const std::stringstream& logStream)
wxQueueEvent(m_pHandler, pEvent);
}

#ifdef __WXDEBUG__

#ifndef NDEBUG
std::cout << "LOGOUTPUT: " << logStream.str() << std::endl;
#endif // __WXDEBUG__

Expand Down
2 changes: 2 additions & 0 deletions pambase/aes67mediasession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ Boolean Aes67MediaSession::parseSDPAttribute_RefClk(char const* sdpLine)
}
}
}
return True;
}
return False;
}


Expand Down
2 changes: 1 addition & 1 deletion pambase/dlldefine.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#define WINVER 0x0600
#include <wx/string.h>


#ifdef __WXMSW__
#ifdef CREATING_DLL
Expand Down
6 changes: 4 additions & 2 deletions pambase/pambase.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-D__GNU__" />
<Add option="-DPTPMONKEY" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DPTPMONKEY" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand All @@ -128,17 +128,18 @@
<Add library="BasicUsageEnvironment" />
<Add library="UsageEnvironment" />
<Add library="groupsock" />
<Add library="/usr/local/lib/pam2/libptpmonkey.so" />
<Add library="pml_log" />
<Add library="pml_dnssd" />
<Add library="sapserver" />
<Add library="ptpmonkey" />
<Add directory="/usr/lib/arm-linux-gnueabihf/" />
</Linker>
<ExtraCommands>
<Add after="../manifest_creator/bin/LinuxRelease/manifest_creator" />
<Add after="cp ../external/log/lib/* ../lib" />
<Add after="cp ../external/dnssd/lib/* ../lib" />
<Add after="cp ../external/sapserver/lib/* ../lib" />
<Add after="cp ../external/ptpmonkey/bin/* ../lib" />
<Mode after="always" />
</ExtraCommands>
</Target>
Expand Down Expand Up @@ -207,6 +208,7 @@
<Add directory="../external/log/lib" />
<Add directory="../external/dnssd/lib" />
<Add directory="../external/sapserver/lib" />
<Add directory="../external/ptpmonkey/bin" />
</Linker>
<Unit filename="AES67ServerMediaSubsession.cpp" />
<Unit filename="AES67ServerMediaSubsession.h" />
Expand Down
1 change: 1 addition & 0 deletions pambase/pcstats.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once
#include "dlldefine.h"
#include <map>
#include <wx/string.h>

class PAMBASE_IMPEXPORT pcStats
{
Expand Down
1 change: 1 addition & 0 deletions pambase/ppmtypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <vector>
#include <map>
#include "dlldefine.h"
#include <wx/string.h>

struct PAMBASE_IMPEXPORT ppmtype
{
Expand Down
1 change: 1 addition & 0 deletions pambase/wxptp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ wxDEFINE_EVENT(wxEVT_CLOCK_MSG_FOLLOWUP,wxCommandEvent);
wxDEFINE_EVENT(wxEVT_CLOCK_MSG_DELAY_REQUEST,wxCommandEvent);
wxDEFINE_EVENT(wxEVT_CLOCK_MSG_DELAY_RESPONSE,wxCommandEvent);


using namespace ptpmonkey;

void wxPtpEventHandler::AddHandler(wxEvtHandler* pHandler)
Expand Down
1 change: 1 addition & 0 deletions pamfft/pamfft.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
1 change: 1 addition & 0 deletions pamlevel/pamlevel.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
2 changes: 1 addition & 1 deletion pamlevel/truepeakcalculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void TruePeakCalculator::InputSession(const session& aSession)
if(m_nChannels != 0)
{
#ifdef __WXMSW__
#ifdef __WXDEBUG__
#ifndef NDEBUG
m_pSrc->pState = src_new (SRC_SINC_FASTEST, min((unsigned int)256 ,aSession.GetCurrentSubsession()->nChannels), &nError);
#else
m_pSrc->pState = src_new (SRC_SINC_BEST_QUALITY, min((unsigned int)256 ,aSession.GetCurrentSubsession()->nChannels), &nError);
Expand Down
1 change: 1 addition & 0 deletions pamupdatemanager/pamupdatemanager.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
<Add option="-D__WXGNU__" />
<Add option="-D_app_" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
1 change: 1 addition & 0 deletions plugins/LTC/LTC.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
1 change: 1 addition & 0 deletions plugins/LTCGenerator/LTCGenerator.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
<Add directory="../../external/libltc" />
</Compiler>
<Linker>
Expand Down
1 change: 1 addition & 0 deletions plugins/MP3Streamer/MP3Streamer.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
<Add directory="$(#live_basicusage.INCLUDE)" />
<Add directory="$(#live_group.INCLUDE)" />
<Add directory="$(#live_media.INCLUDE)" />
Expand Down
1 change: 1 addition & 0 deletions plugins/anglemeters/anglemeters.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
1 change: 1 addition & 0 deletions plugins/aoip info/aoip info.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<Add option="-DPTPMONKEY" />
<Add option="-D__GNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
1 change: 1 addition & 0 deletions plugins/battery/battery.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
1 change: 1 addition & 0 deletions plugins/channel delay/channel delay.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
1 change: 1 addition & 0 deletions plugins/distortion/distortion.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
1 change: 1 addition & 0 deletions plugins/fft/fft.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
13 changes: 7 additions & 6 deletions plugins/fftphase/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,18 @@ file(GLOB SOURCES "*.cpp")

add_library(fftphase MODULE ${SOURCES})

target_compile_definitions(fftphase PUBLIC DLL_EXPORTS wxUSE_UNICODE _monitor_ _MSL_STDINT_H wxDEBUG_LEVEL=0)
target_compile_definitions(fftphase PUBLIC DLL_EXPORTS wxUSE_UNICODE _monitor_ _MSL_STDINT_H)

list(APPEND flags "-fPIC" "-Wall" "-fpermissive" "-O3")
list(APPEND flags "-fPIC" "-Wall" "-fpermissive" "-O3" "-std=c++14")

if(CMAKE_BUILD_TYPE STREQUAL "Release")
list(APPEND flags "-O3")
target_compile_definitions(fft PUBLIC NDEBUG)
target_compile_definitions(fftphase PUBLIC NDEBUG wxDEBUG_LEVEL=0)
set_target_properties(fftphase PROPERTIES LIBRARY_OUTPUT_DIRECTORY "../../../lib/monitor")
elseif(CMAKE_BUILD_TYPE STREQUAL "Debug")
list(APPEND flags "-Og")
target_compile_options(fft PRIVATE ${flags})
target_compile_definitions(fft PUBLIC __WXDEBUG__)
target_compile_definitions(fftphase PUBLIC __WXDEBUG__)
set_target_properties(fftphase PROPERTIES LIBRARY_OUTPUT_DIRECTORY "../../../lib/monitor/debug")
endif()

target_compile_options(fftphase PRIVATE ${flags})
Expand All @@ -49,7 +50,7 @@ target_link_libraries(fftphase ${wxWidgets_LIBRARIES})
target_link_libraries(fftphase pambase)
target_link_libraries(fftphase pamfft)

set_target_properties(fftphase PROPERTIES LIBRARY_OUTPUT_DIRECTORY "../../../lib/monitor")


#linux specific
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
Expand Down
1 change: 1 addition & 0 deletions plugins/fftphase/fftphase.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
1 change: 1 addition & 0 deletions plugins/identify/identify.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
1 change: 1 addition & 0 deletions plugins/levels/levels.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
1 change: 1 addition & 0 deletions plugins/lineup/lineup.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
1 change: 1 addition & 0 deletions plugins/lissajou/lissajou.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
1 change: 1 addition & 0 deletions plugins/meters/meters.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
1 change: 1 addition & 0 deletions plugins/peak count/peakcount.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
1 change: 1 addition & 0 deletions plugins/peak log/peak log.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
1 change: 1 addition & 0 deletions plugins/polarscope/polarscope.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
1 change: 1 addition & 0 deletions plugins/ptp/ptp.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<Add option="-D__WXGNU__" />
<Add option="-D__GNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
<Add directory="pml_log" />
</Compiler>
<Linker>
Expand Down
1 change: 1 addition & 0 deletions plugins/r128/r128.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
1 change: 1 addition & 0 deletions plugins/radar/radar.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
1 change: 1 addition & 0 deletions plugins/record/record.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
1 change: 1 addition & 0 deletions plugins/scope/scope.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
1 change: 1 addition & 0 deletions plugins/spectogram/spectogram.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D__WXGNU__" />
<Add option="-DwxDEBUG_LEVEL=0" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
Expand Down
Loading

0 comments on commit a0342da

Please sign in to comment.