Fix cmake standalone build (#56)

This commit is contained in:
tevador 2019-06-10 15:58:12 +02:00 committed by GitHub
parent 0c5b666df4
commit d660798b9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,6 +26,8 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cmake_minimum_required(VERSION 2.8.7)
set (randomx_sources set (randomx_sources
src/aes_hash.cpp src/aes_hash.cpp
src/argon2_ref.c src/argon2_ref.c
@ -48,6 +50,14 @@ src/virtual_machine.cpp
src/vm_compiled_light.cpp src/vm_compiled_light.cpp
src/blake2/blake2b.c) src/blake2/blake2b.c)
if (NOT ARCH_ID)
set(ARCH_ID ${CMAKE_HOST_SYSTEM_PROCESSOR})
endif()
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
if (ARCH_ID STREQUAL "x86_64" OR ARCH_ID STREQUAL "x86-64" OR ARCH_ID STREQUAL "amd64") if (ARCH_ID STREQUAL "x86_64" OR ARCH_ID STREQUAL "x86-64" OR ARCH_ID STREQUAL "amd64")
list(APPEND randomx_sources list(APPEND randomx_sources
src/jit_compiler_x86_static.S src/jit_compiler_x86_static.S