Skip to content

Commit

Permalink
Use set(...) not list( APPEND ... ) for first assignments in cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Licameli committed Apr 17, 2024
1 parent 16df49d commit 4621db9
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions cmake-proxies/libscorealign/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ add_library( ${TARGET} STATIC )

def_vars()

list( APPEND SOURCES
set( SOURCES
PRIVATE
${TARGET_ROOT}/audioreader.cpp
${TARGET_ROOT}/comp_chroma.cpp
Expand All @@ -16,7 +16,7 @@ list( APPEND SOURCES
${TARGET_ROOT}/fft3/FFT3.cpp
)

list( APPEND INCLUDES
set( INCLUDES
PUBLIC
${TARGET_ROOT}
)
Expand Down
8 changes: 4 additions & 4 deletions cmake-proxies/libsoxr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def_vars()

set(CMAKE_MODULE_PATH ${TARGET_ROOT}/cmake/Modules )

list( APPEND SOURCES
set( SOURCES
PRIVATE
${TARGET_ROOT}/src/cr.c
${TARGET_ROOT}/src/cr32.c
Expand All @@ -23,21 +23,21 @@ list( APPEND SOURCES
${TARGET_ROOT}/src/vr32.c
)

list( APPEND INCLUDES
set( INCLUDES
PRIVATE
${_PRVDIR}
PUBLIC
${TARGET_ROOT}/src
)

list( APPEND DEFINES
set( DEFINES
PRIVATE
_USE_MATH_DEFINES
_CRT_SECURE_NO_WARNINGS
SOXR_LIB
)

list( APPEND OPTIONS
set( OPTIONS
PRIVATE
$<$<C_COMPILER_ID:AppleClang,Clang,GNU>:
-Wconversion
Expand Down
2 changes: 1 addition & 1 deletion images/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def_vars()

# This isn't really a target...

list( APPEND PIXMAPS
set( PIXMAPS
${_SRCDIR}/gnome-mime-application-x-audacity-project.xpm
${_SRCDIR}/icons/16x16/audacity16.xpm
${_SRCDIR}/icons/32x32/audacity32.xpm
Expand Down
10 changes: 5 additions & 5 deletions lib-src/libnyquist/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ add_library( ${TARGET} STATIC )

def_vars()

list( APPEND SOURCES
set( SOURCES
PRIVATE
# libnyquist

Expand Down Expand Up @@ -263,7 +263,7 @@ list( APPEND SOURCES
nyquist/xlisp/xlsys.c
)

list( APPEND INCLUDES
set( INCLUDES
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/nyquist/cmt
${CMAKE_CURRENT_SOURCE_DIR}/nyquist/cmupv/src
Expand All @@ -279,7 +279,7 @@ list( APPEND INCLUDES
${CMAKE_CURRENT_SOURCE_DIR}
)

list( APPEND DEFINES
set( DEFINES
PUBLIC
USE_NYQUIST=1
PRIVATE
Expand All @@ -288,12 +288,12 @@ list( APPEND DEFINES
$<$<PLATFORM_ID:Windows>:WIN32>
)

list( APPEND OPTIONS
set( OPTIONS
PRIVATE
$<$<PLATFORM_ID:Darwin>:-fno-common>
)

list( APPEND LIBRARIES
set( LIBRARIES
PRIVATE
portaudio::portaudio
SndFile::sndfile
Expand Down
8 changes: 4 additions & 4 deletions lib-src/portmixer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ elseif( WIN32 )
)
endif()

list( APPEND SOURCES
set( SOURCES
PRIVATE
include/portmixer.h

Expand Down Expand Up @@ -71,14 +71,14 @@ list( APPEND SOURCES
>
)

list( APPEND INCLUDES
set( INCLUDES
PRIVATE
src
PUBLIC
include
)

list( APPEND DEFINES
set( DEFINES
PUBLIC
USE_PORTMIXER=1
PRIVATE
Expand Down Expand Up @@ -109,7 +109,7 @@ list( APPEND DEFINES
>
)

list( APPEND LIBRARIES
set( LIBRARIES
PRIVATE
portaudio::portaudio
)
Expand Down
2 changes: 1 addition & 1 deletion libraries/lib-exceptions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ to catch all otherwise uncaught exceptions. That is a responsibility of high
level code.
]]#

list( APPEND SOURCES
set( SOURCES
AudacityException.cpp
AudacityException.h
InconsistencyException.cpp
Expand Down
2 changes: 1 addition & 1 deletion nyquist/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ message( STATUS "========== Configuring ${TARGET} ==========" )

def_vars()

list( APPEND RUNTIME
set( RUNTIME
aud-do-support.lsp
dspprims.lsp
envelopes.lsp
Expand Down
2 changes: 1 addition & 1 deletion plug-ins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ message( STATUS "========== Configuring ${TARGET} ==========" )

def_vars()

list( APPEND SOURCES
set( SOURCES
ShelfFilter.ny
SpectralEditMulti.ny
SpectralEditParametricEQ.ny
Expand Down
16 changes: 8 additions & 8 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ set( USE_VST ${${_OPT}use_vst} CACHE INTERNAL "" )
#
#
#
list( APPEND SOURCES
set( SOURCES
PRIVATE
ActiveProject.cpp
ActiveProject.h
Expand Down Expand Up @@ -938,14 +938,14 @@ list( APPEND SOURCES
#
#
#
list( APPEND HEADERS
set( HEADERS
../include/audacity/Types.h
)

#
#
#
list( APPEND INCLUDES
set( INCLUDES
PUBLIC
${_PRVDIR}
${topdir}/include
Expand All @@ -955,14 +955,14 @@ list( APPEND INCLUDES
#
# Define resources
#
list( APPEND RESOURCES
set( RESOURCES
${topdir}/resources/EffectsMenuDefaults.xml
)

#
#
#
list( APPEND DEFINES
set( DEFINES
PRIVATE
BUILDING_AUDACITY
WXUSINGDLL
Expand Down Expand Up @@ -1002,7 +1002,7 @@ endif()

audacity_append_common_compiler_options( OPTIONS "${${_OPT}use_pch}" )

list( APPEND LDFLAGS
set( LDFLAGS
PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:/MANIFEST:NO>
$<$<CXX_COMPILER_ID:GNU>:-Wl,--disable-new-dtags>
Expand Down Expand Up @@ -1063,7 +1063,7 @@ endif()

if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
# Define the Windows specific resources
list( APPEND WIN_RESOURCES
set( WIN_RESOURCES
../win/audacity.rc
)

Expand Down Expand Up @@ -1112,7 +1112,7 @@ elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
endif()

# Define Mac specific resources
list( APPEND MAC_RESOURCES
set( MAC_RESOURCES
../mac/Resources/Audacity.icns
../mac/Resources/AudacityAIFF.icns
../mac/Resources/AudacityAU.icns
Expand Down

0 comments on commit 4621db9

Please sign in to comment.