cmake_minimum_required (VERSION 3.3)

project (salsa20
    VERSION 1.0.0.0
    LANGUAGES CXX)

set (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake)

set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")

include (EnableCatch)
include (EnableCppFormat)
include (FindPythonInterp)

add_subdirectory (src)
add_subdirectory (test)


cmake_minimum_required (VERSION 3.3)

project (SALSA20
         VERSION 1.0.0.0
         LANGUAGES CXX)

function (setvar_default var_)
    if (NOT DEFINED ${var_})
        set (${var_} ${ARGN} PARENT_SCOPE)
    endif ()
endfunction ()

setvar_default (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMake)
setvar_default (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
setvar_default (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
setvar_default (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")

include (EnableCatch)
include (EnableCppFormat)
include (FindPythonInterp)

add_subdirectory (src)
add_subdirectory (test)

Set CMake's control variables only if not defined
Set CMake's control variables only if not defined
