Skip to content

Commit

Permalink
fix: smoother build process on norns
Browse files Browse the repository at this point in the history
  • Loading branch information
midouest committed Feb 24, 2021
1 parent 64fcd3b commit 544a8e1
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 23 deletions.
51 changes: 29 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# basic project config
cmake_minimum_required(VERSION 3.19)
cmake_minimum_required(VERSION 3.7)
set(project_name "bytebeat")
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake_modules ${CMAKE_MODULE_PATH})
set(CMAKE_CXX_STANDARD 11)
Expand Down Expand Up @@ -44,40 +44,47 @@ option(SCSYNTH "Build plugins for scsynth" ON)
option(NATIVE "Optimize for native architecture" OFF)
option(STRICT "Use strict warning flags" OFF)
# option(NOVA_SIMD "Build plugins with nova-simd support." ON)
option(CLI "Build command-line tool" ON)
option(TEST "Build Catch2 test cases" ON)

# include libraries
# if (NOVA_SIMD)
# add_definitions(-DNOVA_SIMD)
# include_directories(${SC_PATH}/external_libraries/nova-simd)
# endif()

# bytebeat target
set(common_cpp_files
src/parse.cpp
src/tokenize.cpp
)
add_executable(
bytebeat
src/main.cpp
${common_cpp_files}
)
target_include_directories(bytebeat PRIVATE include)

# bytebeat target
if(CLI)
add_executable(
bytebeat
src/main.cpp
${common_cpp_files}
)
target_include_directories(bytebeat PRIVATE include)
endif()

# test_bytebeat target
set(test_cpp_files
test/test_expression.cpp
test/test_parse.cpp
test/test_tokenize.cpp
)
find_package(Catch2 REQUIRED)
add_executable(
test_bytebeat
test/test.cpp
${common_cpp_files}
${test_cpp_files}
)
target_include_directories(test_bytebeat PRIVATE include)
target_link_libraries(test_bytebeat PRIVATE Catch2::Catch2)
if(TEST)
set(test_cpp_files
test/test_expression.cpp
test/test_parse.cpp
test/test_tokenize.cpp
)
find_package(Catch2 REQUIRED)
add_executable(
test_bytebeat
test/test.cpp
${common_cpp_files}
${test_cpp_files}
)
target_include_directories(test_bytebeat PRIVATE include)
target_link_libraries(test_bytebeat PRIVATE Catch2::Catch2)
endif()

# SuperCollider targets
set(plugin_cpp_files
Expand Down
3 changes: 2 additions & 1 deletion plugins/ByteBeat/ByteBeat.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <SC_PlugIn.hpp>

#include <string>
#include <stdexcept>

#include "ByteBeat.hpp"
#include "parse.hpp"
Expand Down Expand Up @@ -36,7 +37,7 @@ namespace ByteBeat
{
bb::Expression *prevExpr = mExpression;
mExpression = bb::parse(s);
// mNextSample = sampleByteBeat();
mNextSample = sampleByteBeat();
delete prevExpr;
}
catch (invalid_argument &ex)
Expand Down
1 change: 1 addition & 0 deletions src/tokenize.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <string>
#include <vector>
#include <stdexcept>

#include "tokenize.hpp"

Expand Down

0 comments on commit 544a8e1

Please sign in to comment.